<div class="gallery">
<h2>View Gallery</h2>

	<dl>
		<dt>Id</dt>
		<dd>&nbsp;<?php echo $gallery['Gallery']['id']?></dd>
		<dt>Name</dt>
		<dd>&nbsp;<?php echo $gallery['Gallery']['name']?></dd>
		<dt>Url</dt>
		<dd>&nbsp;<?php echo $gallery['Gallery']['url']?></dd>
		<dt>Primary Image</dt>
		<dd>&nbsp;<?php echo $gallery['Gallery']['primary_image']?></dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link('Edit Gallery',   array('action'=>'edit', $gallery['Gallery']['id'])); ?> </li>
		<li><?php echo $html->link('Delete Gallery', array('action'=>'delete', $gallery['Gallery']['id']), null, 'Are you sure you want to delete #' . $gallery['Gallery']['id'] . '?'); ?> </li>
		<li><?php echo $html->link('List Galleries', array('action'=>'index')); ?> </li>
		<li><?php echo $html->link('New Gallery',	array('action'=>'add')); ?> </li>
	</ul>

</div>
<div class="related">
<h3>Related Images</h3>
<?php if(!empty($gallery['Image'])):?>
<table cellpadding="0" cellspacing="0">
	<tr>
		<th>Id</th>
		<th>Filename</th>
		<th>Filesize</th>
		<th>Alt</th>
		<th>Type</th>
		<th>Created</th>
		<th>Modified</th>
		<th>Actions</th>
	</tr>
<?php foreach($gallery['Image'] as $image):?>
	<tr>
		<td><?php echo $image['id'];?></td>
		<td><?php echo $image['filename'];?></td>
		<td><?php echo $image['filesize'];?></td>
		<td><?php echo $image['alt'];?></td>
		<td><?php echo $image['type'];?></td>
		<td><?php echo $image['created'];?></td>
		<td><?php echo $image['modified'];?></td>
		<td class="actions">
			<?php echo $html->link('View', array('controller'=> 'images', 'action'=>'view', $image['id'])); ?>
			<?php echo $html->link('Edit', array('controller'=> 'images', 'action'=>'edit', $image['id'])); ?>
			<?php echo $html->link('Delete', array('controller'=> 'images', 'action'=>'delete', $image['id']), null, 'Are you sure you want to delete #' . $image['id'] . '?'); ?>
		</td>
	</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link('New Image', array('controller'=> 'images', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
